<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen; http://apigen.org" />

	<title>Class Nette\Application\Route</title>

	<link rel="stylesheet" href="resources/style.css?v=2011071314" type="text/css" media="all" />
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Nette Framework API documentation" />
	<script type="text/javascript" src="resources/combined.js"></script>
	<script type="text/javascript" src="allclasses.js"></script>
</head>

<body>
<div id="left">
	<a href="allclasses.html">All Classes</a>

	<h3>Namespaces</h3>
	<ul>
		<li><a href="namespace-none.html">none</a>
		</li>
		<li><a href="namespace-Nette.html">Nette</a>
		</li>
		<li class="active"><a href="namespace-Nette.Application.html">Nette\Application</a>
		</li>
		<li><a href="namespace-Nette.Caching.html">Nette\Caching</a>
		</li>
		<li><a href="namespace-Nette.Collections.html">Nette\Collections</a>
		</li>
		<li><a href="namespace-Nette.Config.html">Nette\Config</a>
		</li>
		<li><a href="namespace-Nette.Forms.html">Nette\Forms</a>
		</li>
		<li><a href="namespace-Nette.IO.html">Nette\IO</a>
		</li>
		<li><a href="namespace-Nette.Loaders.html">Nette\Loaders</a>
		</li>
		<li><a href="namespace-Nette.Mail.html">Nette\Mail</a>
		</li>
		<li><a href="namespace-Nette.Reflection.html">Nette\Reflection</a>
		</li>
		<li><a href="namespace-Nette.Security.html">Nette\Security</a>
		</li>
		<li><a href="namespace-Nette.Templates.html">Nette\Templates</a>
		</li>
		<li><a href="namespace-Nette.Web.html">Nette\Web</a>
		</li>
		<li><a href="namespace-PHP.html">PHP</a>
		</li>
	</ul>

	<hr />

	<h3>Classes</h3>

	<ul>
		<li><a href="Nette.Application.AppForm.html">AppForm</a></li>
		<li><a href="Nette.Application.Application.html">Application</a></li>
		<li><a href="Nette.Application.CliRouter.html">CliRouter</a></li>
		<li><a href="Nette.Application.Control.html">Control</a></li>
		<li><a href="Nette.Application.DownloadResponse.html">DownloadResponse</a></li>
		<li><a href="Nette.Application.ForwardingResponse.html">ForwardingResponse</a></li>
		<li><a href="Nette.Application.JsonResponse.html">JsonResponse</a></li>
		<li><a href="Nette.Application.Link.html">Link</a></li>
		<li><a href="Nette.Application.MultiRouter.html">MultiRouter</a></li>
		<li><a href="Nette.Application.Presenter.html">Presenter</a></li>
		<li><a href="Nette.Application.PresenterComponent.html">PresenterComponent</a></li>
		<li><a href="Nette.Application.PresenterLoader.html">PresenterLoader</a></li>
		<li><a href="Nette.Application.PresenterRequest.html">PresenterRequest</a></li>
		<li><a href="Nette.Application.RedirectingResponse.html">RedirectingResponse</a></li>
		<li><a href="Nette.Application.RenderResponse.html">RenderResponse</a></li>
		<li class="active"><a href="Nette.Application.Route.html">Route</a></li>
		<li><a href="Nette.Application.SimpleRouter.html">SimpleRouter</a></li>
	</ul>

	<h3>Interfaces</h3>

	<ul>
		<li><a href="Nette.Application.IPartiallyRenderable.html">IPartiallyRenderable</a></li>
		<li><a href="Nette.Application.IPresenter.html">IPresenter</a></li>
		<li><a href="Nette.Application.IPresenterLoader.html">IPresenterLoader</a></li>
		<li><a href="Nette.Application.IPresenterResponse.html">IPresenterResponse</a></li>
		<li><a href="Nette.Application.IRenderable.html">IRenderable</a></li>
		<li><a href="Nette.Application.IRouter.html">IRouter</a></li>
		<li><a href="Nette.Application.ISignalReceiver.html">ISignalReceiver</a></li>
		<li><a href="Nette.Application.IStatePersistent.html">IStatePersistent</a></li>
	</ul>

	<h3>Exceptions</h3>

	<ul>
		<li><a href="Nette.Application.AbortException.html">AbortException</a></li>
		<li><a href="Nette.Application.ApplicationException.html">ApplicationException</a></li>
		<li><a href="Nette.Application.BadRequestException.html">BadRequestException</a></li>
		<li><a href="Nette.Application.BadSignalException.html">BadSignalException</a></li>
		<li><a href="Nette.Application.ForbiddenRequestException.html">ForbiddenRequestException</a></li>
		<li><a href="Nette.Application.InvalidLinkException.html">InvalidLinkException</a></li>
		<li><a href="Nette.Application.InvalidPresenterException.html">InvalidPresenterException</a></li>
	</ul>
</div>

<div id="right">
	<form action="http://www.google.com/cse" id="search" onsubmit="if(this.q.value.indexOf('more:')==-1)this.q.value+=' more:api'">
		<input type="hidden" name="cx" value="011549293477758430224:vxofa9ufnhc" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" class="text" /><input type="submit" value="Search" />
	</form>

<div id="navigation">
	<ul>
		<li><a href="overview.html" title="Summary of all namespaces">Overview</a></li>
		<li><a href="namespace-Nette.Application.html" title="Summary of Nette\Application">Namespace</a></li>
		<li class="active">Class</li>
		<li><a href="elements.html">Elements</a></li>
	</ul>
</div>

<div id="content">
	<div id="classSummary">
		<p>namespace <a href="namespace-Nette.Application.html">Nette\Application</a></p>

		<h1>Class Route</h1>

		<div class="classDescription">
		
<p>The bidirectional route is responsible for mapping<br>
HTTP request to a PresenterRoute object for dispatch and vice-versa.</p>

		</div>

		<dl class="tree">
			<dd style="padding-left:0px">
				<a href="Nette.Object.html">Nette\Object</a>
				
			</dd>
			<dd style="padding-left:30px">
				<img src="resources/inherit.gif" alt="extended by" />
<b>Nette\Application\Route</b>				 implements <a href="Nette.Application.IRouter.html">IRouter</a>
			</dd>
		</dl>



		<div class="classInfo">
			
				<b>Author:</b> David Grudl<br />
			<b>Located at</b> <a href="source-Application.Routers.Route.php.html#18">/Application/Routers/Route.php</a><br />
		</div>
	</div>


	<div id="methodSummary">
		<table class="summary">
		<caption>Method Summary</caption>
		<tr data-order="1 __construct" id="___construct">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#___construct">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#111" title="go to source code"><b>__construct</b></a>(
					string
					<var>$mask</var>, 
					array
					
					<var>$metadata</var> = <span class="php-keyword1">array</span> (
), 
					int
					<var>$flags</var> = <span class="php-num">0</span>
			)</code>

			<div class="short">
				
			</div>

			<div class="detailed">
				


					<h4>Parameters</h4>
					<div class="smallList">
						<code>$mask</code> string URL mask, e.g. ‚&lt;presenter&gt;/&lt;action&gt;/&lt;id \d{1,3}&gt;‘<br />
						<code>$metadata</code> array default values or metadata<br />
						<code>$flags</code> int flags<br />
					</div>



			</div>
			</td>
		</tr>
		<tr data-order="1 match" id="_match">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				<a href="Nette.Application.PresenterRequest.html">PresenterRequest</a>|NULL
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_match">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#129" title="go to source code"><b>match</b></a>(
					<a href="Nette.Web.IHttpRequest.html">Nette\Web\IHttpRequest</a>
					
					<var>$httpRequest</var>
			)</code>

			<div class="short">
				
<p>Maps HTTP request to a PresenterRequest object.</p>

			</div>

			<div class="detailed">
				
<p>Maps HTTP request to a PresenterRequest object.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$httpRequest</code> <a href="Nette.Web.IHttpRequest.html">Nette\Web\IHttpRequest</a> <br />
					</div>

					<h4>Returns</h4>
					<div class="smallList"><a href="Nette.Application.PresenterRequest.html">PresenterRequest</a>|NULL </div>


					<h4>Implementation of</h4>
					<div class="smallList"><code><a href="Nette.Application.IRouter.html#_match">IRouter::match</a></code></div>
			</div>
			</td>
		</tr>
		<tr data-order="1 constructUrl" id="_constructUrl">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				string|NULL
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_constructUrl">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#241" title="go to source code"><b>constructUrl</b></a>(
					<a href="Nette.Application.PresenterRequest.html">PresenterRequest</a>
					
					<var>$appRequest</var>, 
					<a href="Nette.Web.IHttpRequest.html">Nette\Web\IHttpRequest</a>
					
					<var>$httpRequest</var>
			)</code>

			<div class="short">
				
<p>Constructs absolute URL from PresenterRequest object.</p>

			</div>

			<div class="detailed">
				
<p>Constructs absolute URL from PresenterRequest object.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$appRequest</code> <a href="Nette.Web.IHttpRequest.html">Nette\Web\IHttpRequest</a> <br />
						<code>$httpRequest</code> <a href="Nette.Application.PresenterRequest.html">PresenterRequest</a> <br />
					</div>

					<h4>Returns</h4>
					<div class="smallList">string|NULL </div>


					<h4>Implementation of</h4>
					<div class="smallList"><code><a href="Nette.Application.IRouter.html#_constructUrl">IRouter::constructUrl</a></code></div>
			</div>
			</td>
		</tr>
		<tr data-order="1 getMask" id="_getMask">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				string
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getMask">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#563" title="go to source code"><b>getMask</b></a>(
			)</code>

			<div class="short">
				
<p>Returns mask.</p>

			</div>

			<div class="detailed">
				
<p>Returns mask.</p>




					<h4>Returns</h4>
					<div class="smallList">string </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 getDefaults" id="_getDefaults">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				array
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getDefaults">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#574" title="go to source code"><b>getDefaults</b></a>(
			)</code>

			<div class="short">
				
<p>Returns default values.</p>

			</div>

			<div class="detailed">
				
<p>Returns default values.</p>




					<h4>Returns</h4>
					<div class="smallList">array </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 getTargetPresenter" id="_getTargetPresenter">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				string|FALSE
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getTargetPresenter">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#595" title="go to source code"><b>getTargetPresenter</b></a>(
			)</code>

			<div class="short">
				
<p>Proprietary cache aim.</p>

			</div>

			<div class="detailed">
				
<p>Proprietary cache aim.</p>




					<h4>Returns</h4>
					<div class="smallList">string|FALSE </div>


			</div>
			</td>
		</tr>
		<tr data-order="0 addStyle" id="_addStyle">
			<td align="right" width="1%"><code class="nowrap">
				 public static
				
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_addStyle">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#722" title="go to source code"><b>addStyle</b></a>(
					string
					<var>$style</var>, 
					string
					<var>$parent</var> = <span class="php-quote">'#'</span>
			)</code>

			<div class="short">
				
<p>Creates new style.</p>

			</div>

			<div class="detailed">
				
<p>Creates new style.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$style</code> string style name (#style, urlParameter, ?queryParameter)<br />
						<code>$parent</code> string optional parent style name<br />
					</div>



			</div>
			</td>
		</tr>
		<tr data-order="0 setStyleProperty" id="_setStyleProperty">
			<td align="right" width="1%"><code class="nowrap">
				 public static
				
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_setStyleProperty">#</a>
			<code class="nowrap">
				<a href="source-Application.Routers.Route.php.html#747" title="go to source code"><b>setStyleProperty</b></a>(
					string
					<var>$style</var>, 
					string
					<var>$key</var>, 
					mixed
					<var>$value</var>
			)</code>

			<div class="short">
				
<p>Changes style property value.</p>

			</div>

			<div class="detailed">
				
<p>Changes style property value.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$style</code> string style name (#style, urlParameter, ?queryParameter)<br />
						<code>$key</code> string property name (Route::PATTERN, Route::FILTER_IN, Route::FILTER_OUT,
Route::FILTER_TABLE)<br />
						<code>$value</code> mixed property value<br />
					</div>



			</div>
			</td>
		</tr>

		</table>
	</div>


	<h2>Methods Inherited From <a href="Nette.Object.html#methodSummary">Nette\Object</a></h2>
	<div class="box"><code>
		<a href="Nette.Object.html#_getClass" class="deprecated">getClass()</a>, <a href="Nette.Object.html#_getReflection">getReflection()</a>, <a href="Nette.Object.html#___call">__call()</a>, <a href="Nette.Object.html#___callStatic">__callStatic()</a>, <a href="Nette.Object.html#_extensionMethod">extensionMethod()</a>, <a href="Nette.Object.html#___get">__get()</a>, <a href="Nette.Object.html#___set">__set()</a>, <a href="Nette.Object.html#___isset">__isset()</a>, <a href="Nette.Object.html#___unset">__unset()</a>
	</code></div>


	<div id="constantSummary">
		<table class="summary">
		<caption>Constant Summary</caption>
		<tr data-order="PRESENTER_KEY" id="PRESENTER_KEY">
			<td align="right" width="1%"><code><b>PRESENTER_KEY</b></code></td>
			<td><code><span class="php-quote">'presenter'</span></code> <a href="#PRESENTER_KEY" class="anchor">#</a></td>
		</tr>
		<tr data-order="MODULE_KEY" id="MODULE_KEY">
			<td align="right" width="1%"><code><b>MODULE_KEY</b></code></td>
			<td><code><span class="php-quote">'module'</span></code> <a href="#MODULE_KEY" class="anchor">#</a></td>
		</tr>
		<tr data-order="CASE_SENSITIVE" id="CASE_SENSITIVE">
			<td align="right" width="1%"><code><b>CASE_SENSITIVE</b></code></td>
			<td><code><span class="php-num">256</span></code> <a href="#CASE_SENSITIVE" class="anchor">#</a></td>
		</tr>
		<tr data-order="FULL_META" id="FULL_META">
			<td align="right" width="1%"><code><b>FULL_META</b></code></td>
			<td><code><span class="php-num">128</span></code> <a href="#FULL_META" class="anchor">#</a></td>
		</tr>
		<tr data-order="HOST" id="HOST">
			<td align="right" width="1%"><code><b>HOST</b></code></td>
			<td><code><span class="php-num">1</span></code> <a href="#HOST" class="anchor">#</a></td>
		</tr>
		<tr data-order="PATH" id="PATH">
			<td align="right" width="1%"><code><b>PATH</b></code></td>
			<td><code><span class="php-num">2</span></code> <a href="#PATH" class="anchor">#</a></td>
		</tr>
		<tr data-order="RELATIVE" id="RELATIVE">
			<td align="right" width="1%"><code><b>RELATIVE</b></code></td>
			<td><code><span class="php-num">3</span></code> <a href="#RELATIVE" class="anchor">#</a></td>
		</tr>
		<tr data-order="VALUE" id="VALUE">
			<td align="right" width="1%"><code><b>VALUE</b></code></td>
			<td><code><span class="php-quote">'value'</span></code> <a href="#VALUE" class="anchor">#</a></td>
		</tr>
		<tr data-order="PATTERN" id="PATTERN">
			<td align="right" width="1%"><code><b>PATTERN</b></code></td>
			<td><code><span class="php-quote">'pattern'</span></code> <a href="#PATTERN" class="anchor">#</a></td>
		</tr>
		<tr data-order="FILTER_IN" id="FILTER_IN">
			<td align="right" width="1%"><code><b>FILTER_IN</b></code></td>
			<td><code><span class="php-quote">'filterIn'</span></code> <a href="#FILTER_IN" class="anchor">#</a></td>
		</tr>
		<tr data-order="FILTER_OUT" id="FILTER_OUT">
			<td align="right" width="1%"><code><b>FILTER_OUT</b></code></td>
			<td><code><span class="php-quote">'filterOut'</span></code> <a href="#FILTER_OUT" class="anchor">#</a></td>
		</tr>
		<tr data-order="FILTER_TABLE" id="FILTER_TABLE">
			<td align="right" width="1%"><code><b>FILTER_TABLE</b></code></td>
			<td><code><span class="php-quote">'filterTable'</span></code> <a href="#FILTER_TABLE" class="anchor">#</a></td>
		</tr>
		<tr data-order="OPTIONAL" id="OPTIONAL">
			<td align="right" width="1%"><code><b>OPTIONAL</b></code></td>
			<td><code><span class="php-num">0</span></code> <a href="#OPTIONAL" class="anchor">#</a></td>
		</tr>
		<tr data-order="PATH_OPTIONAL" id="PATH_OPTIONAL">
			<td align="right" width="1%"><code><b>PATH_OPTIONAL</b></code></td>
			<td><code><span class="php-num">1</span></code> <a href="#PATH_OPTIONAL" class="anchor">#</a></td>
		</tr>
		<tr data-order="CONSTANT" id="CONSTANT">
			<td align="right" width="1%"><code><b>CONSTANT</b></code></td>
			<td><code><span class="php-num">2</span></code> <a href="#CONSTANT" class="anchor">#</a></td>
		</tr>
		<tr data-order="ONE_WAY" id="ONE_WAY">
			<td align="right" width="1%"><code><b>ONE_WAY</b></code></td>
			<td><code><span class="php-num">1</span></code> <a href="#ONE_WAY" class="anchor">#</a></td>
		</tr>
		<tr data-order="SECURED" id="SECURED">
			<td align="right" width="1%"><code><b>SECURED</b></code></td>
			<td><code><span class="php-num">2</span></code> <a href="#SECURED" class="anchor">#</a></td>
		</tr>
		</table>
	</div>



	<div id="propertySummary">
		<table class="summary">
		<caption>Property Summary</caption>
		<tr data-order="defaultFlags" id="$defaultFlags">
			<td align="right" width="1%"><code class="nowrap">
				 static
				bool
			</code></td>

			<td width="1%"><var>$defaultFlags</var></td>
			<td><pre><span class="php-num">0</span></pre></td>
			<td> <a href="#$defaultFlags" class="anchor">#</a></td>
		</tr>
		<tr data-order="styles" id="$styles">
			<td align="right" width="1%"><code class="nowrap">
				 static
				array
			</code></td>

			<td width="1%"><var>$styles</var></td>
			<td><pre><span class="php-keyword1">array</span> (
  <span class="php-quote">'#'</span> =&gt; 
  <span class="php-keyword1">array</span> (
    <span class="php-quote">'pattern'</span> =&gt; <span class="php-quote">'[^/]+'</span>,
    <span class="php-quote">'filterIn'</span> =&gt; <span class="php-quote">'rawurldecode'</span>,
    <span class="php-quote">'filterOut'</span> =&gt; <span class="php-quote">'rawurlencode'</span>,
  ),
  <span class="php-quote">'?#'</span> =&gt; 
  <span class="php-keyword1">array</span> (
  ),
  <span class="php-quote">'module'</span> =&gt; 
  <span class="php-keyword1">array</span> (
    <span class="php-quote">'pattern'</span> =&gt; <span class="php-quote">'[a-z][a-z0-9.-]*'</span>,
    <span class="php-quote">'filterIn'</span> =&gt; 
    <span class="php-keyword1">array</span> (
      <span class="php-num">0</span> =&gt; <span class="php-quote">'Nette\\Application\\Route'</span>,
      <span class="php-num">1</span> =&gt; <span class="php-quote">'path2presenter'</span>,
    ),
    <span class="php-quote">'filterOut'</span> =&gt; 
    <span class="php-keyword1">array</span> (
      <span class="php-num">0</span> =&gt; <span class="php-quote">'Nette\\Application\\Route'</span>,
      <span class="php-num">1</span> =&gt; <span class="php-quote">'presenter2path'</span>,
    ),
  ),
  <span class="php-quote">'presenter'</span> =&gt; 
  <span class="php-keyword1">array</span> (
    <span class="php-quote">'pattern'</span> =&gt; <span class="php-quote">'[a-z][a-z0-9.-]*'</span>,
    <span class="php-quote">'filterIn'</span> =&gt; 
    <span class="php-keyword1">array</span> (
      <span class="php-num">0</span> =&gt; <span class="php-quote">'Nette\\Application\\Route'</span>,
      <span class="php-num">1</span> =&gt; <span class="php-quote">'path2presenter'</span>,
    ),
    <span class="php-quote">'filterOut'</span> =&gt; 
    <span class="php-keyword1">array</span> (
      <span class="php-num">0</span> =&gt; <span class="php-quote">'Nette\\Application\\Route'</span>,
      <span class="php-num">1</span> =&gt; <span class="php-quote">'presenter2path'</span>,
    ),
  ),
  <span class="php-quote">'action'</span> =&gt; 
  <span class="php-keyword1">array</span> (
    <span class="php-quote">'pattern'</span> =&gt; <span class="php-quote">'[a-z][a-z0-9-]*'</span>,
    <span class="php-quote">'filterIn'</span> =&gt; 
    <span class="php-keyword1">array</span> (
      <span class="php-num">0</span> =&gt; <span class="php-quote">'Nette\\Application\\Route'</span>,
      <span class="php-num">1</span> =&gt; <span class="php-quote">'path2action'</span>,
    ),
    <span class="php-quote">'filterOut'</span> =&gt; 
    <span class="php-keyword1">array</span> (
      <span class="php-num">0</span> =&gt; <span class="php-quote">'Nette\\Application\\Route'</span>,
      <span class="php-num">1</span> =&gt; <span class="php-quote">'action2path'</span>,
    ),
  ),
  <span class="php-quote">'?module'</span> =&gt; 
  <span class="php-keyword1">array</span> (
  ),
  <span class="php-quote">'?presenter'</span> =&gt; 
  <span class="php-keyword1">array</span> (
  ),
  <span class="php-quote">'?action'</span> =&gt; 
  <span class="php-keyword1">array</span> (
  ),
)</pre></td>
			<td> <a href="#$styles" class="anchor">#</a></td>
		</tr>

		</table>
	</div>


</div>

	<div id="footer">
		Nette Framework API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
</body>
</html>
